/**************************************************************************
* This file is part of Hawkengine.
*
* Hawkengine is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Hawkengine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Hawkengine.  If not, see <http://www.gnu.org/licenses/>.
**************************************************************************/

#ifndef _FONT_H_
#define _FONT_H_

/**************************************************************************
* Dependencies
**************************************************************************/
#include "engine/common.h"
#include "engine/color.h"
 
/**************************************************************************
* Preprocessing
**************************************************************************/
#ifdef __cplusplus
extern "C" {
#endif

/**************************************************************************
* Types
**************************************************************************/
typedef enum
{
  ALIGN_CENTER,
  ALIGN_LEFT,
  ALIGN_RIGHT,
  ALIGN_BOTTOM,
  ALIGN_TOP,
} align_type;

/**************************************************************************
* Variables
**************************************************************************/
extern color_type font_shadow_color;
extern BOOL font_use_shadow;

/**************************************************************************
* Static Variables
**************************************************************************/

/**************************************************************************
* Function Prototypes
**************************************************************************/
int font_count_lines(const char* text, int* max_width);
void font_init(void);
void font_render_float(float value, UCHAR leading, UCHAR trailing,
                  float size, float x, float y);
void font_render_int(int value, UCHAR leading, float size, float x, float y);
void font_render_text(const char* text, float size, float x, float y);
void font_render_text_aligned(const char* text, float size, float x, float y,
                              align_type align_x, align_type align_y);
void font_render_text_wrapped(const char* text, float size, float x, float y,
                              float width);

/**************************************************************************
* Function Implementations
**************************************************************************/


#ifdef __cplusplus
}
#endif

#endif

